\section{Assignment 1: the valentine logic puzzle}
The exact description of the exercise can be found in the course materials section on blackboard. A short description about how this exercise was done is given.

The first order of business is defining the variables that prolog can use. For this exercise there are three sets with 5 values. Each value can be used only once in every set. This gives the following code:

\begin{lstlisting}
Vars = [Alice, Bob, Carol, Dick, Edna, Rose, Heart, Sun, Landscape, Deer, Priscilla, Rhonda, Quincy, Simon, Tina],	
Vars ins 1..5,
all_different([Alice,Bob,Carol,Dick,Edna]),
all_different([Rose,Heart,Sun,Landscape,Deer]),
all_different([Priscilla, Rhonda, Quincy, Simon, Tina]),
\end{lstlisting}

After this the predicates have to be defined:

\begin{lstlisting}
Carol #= Rose,
Dick #= Sun,
Bob #= Rhonda,
Bob #\= Landscape,
Alice #\= Priscilla,
Edna #= Quincy,
Tina #\= Deer,
Simon #= Deer,
Priscilla #\= Rose,
\end{lstlisting}

The fourth predicate was somewhat of a surprise to us. This would seam like a natural deduction from the definition of the variables, but if this predicate is not used a second solution is found. This solution gives a lot of permutations. The amount of permutations can be reduced by setting more variables. We have assigned the first set of variable with set numbers. This causes the possible permutations to be reduced to 1.

\label{sec:assignment1}
